home *** CD-ROM | disk | FTP | other *** search
/ Game Cracker (Expanded Edition) / Game Cracker (Expanded Edition).iso / cracks / SV_MK3.ZIP / Mortal Kombat 3.txt < prev   
Encoding:
Text File  |  1998-06-01  |  17.9 KB  |  382 lines

  1.  
  2. Free Information Xchange '98 presents:
  3.  
  4. Mortal Kombat 3 - CD crack by Static Vengeance
  5.  
  6. Requirements:
  7. Full install and hex editor
  8. W32Dasm if you want to follow along
  9.  
  10.     While Mortal Kombat 3 for Win95 is a VERY old game it has a useful purpose here.  It's another
  11. example of a CD check and how to bypass it, plus it shows how some games can be moved off a CD to your
  12. hard drive.  First of all, you need to install the game to your hard drive.  When you check what was
  13. installed you'll find just 4 files are placed on your hard drive.  Looking at all the files on the CD
  14. it's clear we will have to do some manual work to get the whole program to be completly runnable from
  15. our hard drives.  The most likley thing we'll need to do is copy all the subdirectories to the same
  16. subdirectory we installed MK3 to.  This'll get things rolling, so let's try to run the program.  No good,
  17. it comes up and asks for the MK3 CD.  So get W32Dasm up and running and disassemble mk3w.exe.  When
  18. W32Dasm is done, go up to the menu bar, select "Refs" and then select "Data String Refs" from the drop
  19. down menu.  Now once the Data String Refs box pops up, grab the slider bar and scroll down to "Please
  20. insert the Mortal Kombat III CD"  Double clicking this will put you in the middle of the CD check:
  21.  
  22. * Referenced by a CALL at Address:
  23. |:00455778                                        <-- Called once from 455778
  24. |
  25. :004552CA 55                      push ebp
  26. :004552CB 8BEC                    mov ebp, esp
  27. :004552CD 81EC78040000            sub esp, 00000478
  28. :004552D3 53                      push ebx
  29. :004552D4 56                      push esi
  30. :004552D5 57                      push edi
  31. :004552D6 C785A0FCFFFF00000000    mov dword ptr [ebp+FFFFFCA0], 00000000
  32.  
  33. * Reference To: KERNEL32.GetCommandLineA, Ord:00A1h
  34.                                   |
  35. :004552E0 FF1584B37700            Call dword ptr [0077B384]
  36. :004552E6 8985F0FDFFFF            mov dword ptr [ebp+FFFFFDF0], eax
  37.  
  38. * Possible StringData Ref from Data Obj ->"mk3w.exe"                     <-- REF to the EXE file
  39.                                   |
  40. :004552EC 68B0116A00              push 006A11B0
  41. :004552F1 8B85F0FDFFFF            mov eax, dword ptr [ebp+FFFFFDF0]
  42. :004552F7 50                      push eax
  43. :004552F8 E83F310000              call 0045843C
  44. :004552FD 83C408                  add esp, 00000008
  45. :00455300 8985ECFDFFFF            mov dword ptr [ebp+FFFFFDEC], eax
  46.  
  47. * Possible StringData Ref from Data Obj ->"xxxxx"
  48.                                   |
  49. :00455306 68BC116A00              push 006A11BC
  50. :0045530B 8B85F0FDFFFF            mov eax, dword ptr [ebp+FFFFFDF0]
  51. :00455311 50                      push eax
  52. :00455312 E825310000              call 0045843C
  53. :00455317 83C408                  add esp, 00000008
  54. :0045531A 8985ECFDFFFF            mov dword ptr [ebp+FFFFFDEC], eax
  55. :00455320 83BDECFDFFFF00          cmp dword ptr [ebp+FFFFFDEC], 00000000
  56. :00455327 0F8539000000            jne 00455366
  57. :0045532D 68F8A84600              push 0046A8F8
  58. :00455332 6804010000              push 00000104
  59.  
  60. * Reference To: KERNEL32.GetCurrentDirectoryA, Ord:00C4h
  61.                                   |
  62. :00455337 FF150CB37700            Call dword ptr [0077B30C]
  63.  
  64. * Possible StringData Ref from Data Obj ->"\"
  65.                                   |
  66. :0045533D 68C4116A00              push 006A11C4
  67. :00455342 68F8A84600              push 0046A8F8
  68. :00455347 E8D82F0000              call 00458324
  69. :0045534C 83C408                  add esp, 00000008
  70. :0045534F 68F8A84600              push 0046A8F8
  71. :00455354 68F8A74600              push 0046A7F8
  72. :00455359 E8CA2F0000              call 00458328
  73. :0045535E 83C408                  add esp, 00000008
  74. :00455361 E92F000000              jmp 00455395
  75.  
  76. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  77. |:00455327(C)
  78. |
  79. :00455366 8B85ECFDFFFF            mov eax, dword ptr [ebp+FFFFFDEC]
  80. :0045536C C60000                  mov byte ptr [eax], 00
  81. :0045536F 8B85F0FDFFFF            mov eax, dword ptr [ebp+FFFFFDF0]
  82. :00455375 50                      push eax
  83. :00455376 68F8A84600              push 0046A8F8
  84. :0045537B E8A82F0000              call 00458328
  85. :00455380 83C408                  add esp, 00000008
  86. :00455383 68F8A84600              push 0046A8F8
  87. :00455388 68F8A74600              push 0046A7F8
  88. :0045538D E8962F0000              call 00458328
  89. :00455392 83C408                  add esp, 00000008
  90.  
  91. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  92. |:00455361(U)
  93. |
  94. :00455395 68F8A84600              push 0046A8F8
  95.  
  96. * Reference To: KERNEL32.GetDriveTypeA, Ord:00D0h             <-- Common called used in CD check routines
  97.                                   |
  98. :0045539A FF1504B37700            Call dword ptr [0077B304]
  99. :004553A0 83F805                  cmp eax, 00000005           <-- 05 is the value for a CD-ROM drive
  100. :004553A3 0F84A5000000            je 0045544E                 <-- Take this jump is a CD-ROM drive is found
  101. :004553A9 68F8A84600              push 0046A8F8
  102.  
  103. * Reference To: KERNEL32.GetDriveTypeA, Ord:00D0h
  104.                                   |
  105. :004553AE FF1504B37700            Call dword ptr [0077B304]
  106. :004553B4 83F802                  cmp eax, 00000002
  107. :004553B7 0F8491000000            je 0045544E
  108. :004553BD 68F8A84600              push 0046A8F8
  109.  
  110. * Reference To: KERNEL32.GetDriveTypeA, Ord:00D0h
  111.                                   |
  112. :004553C2 FF1504B37700            Call dword ptr [0077B304]
  113. :004553C8 83F806                  cmp eax, 00000006
  114. :004553CB 0F847D000000            je 0045544E
  115. :004553D1 8D8594FBFFFF            lea eax, dword ptr [ebp+FFFFFB94]
  116. :004553D7 50                      push eax
  117. :004553D8 8D858CFBFFFF            lea eax, dword ptr [ebp+FFFFFB8C]
  118. :004553DE 50                      push eax
  119. :004553DF 6A00                    push 00000000
  120. :004553E1 683F000F00              push 000F003F
  121. :004553E6 6A00                    push 00000000
  122.  
  123. * Possible StringData Ref from Data Obj ->"MK3"
  124.                                   |
  125. :004553E8 68C8116A00              push 006A11C8
  126. :004553ED 6A00                    push 00000000
  127.  
  128. * Possible StringData Ref from Data Obj ->"\SOFTWARE\Mortal Kombat III"   <-- Open registry path
  129.                                   |
  130. :004553EF 68CC116A00              push 006A11CC
  131. :004553F4 6802000080              push 80000002
  132.  
  133. * Reference To: ADVAPI32.RegCreateKeyExA, Ord:00B7h
  134.                                   |
  135. :004553F9 FF159CB27700            Call dword ptr [0077B29C]
  136. :004553FF 898590FBFFFF            mov dword ptr [ebp+FFFFFB90], eax
  137. :00455405 68F8A84600              push 0046A8F8
  138. :0045540A E8C52E0000              call 004582D4
  139. :0045540F 83C404                  add esp, 00000004
  140. :00455412 50                      push eax
  141. :00455413 68F8A84600              push 0046A8F8
  142. :00455418 6A01                    push 00000001
  143. :0045541A 6A00                    push 00000000
  144.  
  145. * Possible StringData Ref from Data Obj ->"path"              <-- Get installation path
  146.                                   |
  147. :0045541C 68E8116A00              push 006A11E8
  148. :00455421 8B858CFBFFFF            mov eax, dword ptr [ebp+FFFFFB8C]
  149. :00455427 50                      push eax
  150.  
  151. * Reference To: ADVAPI32.RegSetValueExA, Ord:00DBh
  152.                                   |
  153. :00455428 FF15A4B27700            Call dword ptr [0077B2A4]
  154. :0045542E 898590FBFFFF            mov dword ptr [ebp+FFFFFB90], eax
  155. :00455434 8B858CFBFFFF            mov eax, dword ptr [ebp+FFFFFB8C]
  156. :0045543A 50                      push eax
  157.  
  158. * Reference To: ADVAPI32.RegFlushKey, Ord:00C4h
  159.                                   |
  160. :0045543B FF1598B27700            Call dword ptr [0077B298]
  161. :00455441 8B858CFBFFFF            mov eax, dword ptr [ebp+FFFFFB8C]
  162. :00455447 50                      push eax
  163.  
  164. * Reference To: ADVAPI32.RegCloseKey, Ord:00B3h
  165.                                   |
  166. :00455448 FF15A0B27700            Call dword ptr [0077B2A0]
  167.  
  168. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  169. |:004553A3(C), :004553B7(C), :004553CB(C)
  170. |
  171.  
  172. * Reference To: KERNEL32.GetLogicalDrives, Ord:00E9h                   <-- Commonly used call in CD checks
  173.                                   |
  174. :0045544E FF1508B37700            Call dword ptr [0077B308]
  175. :00455454 89859CFCFFFF            mov dword ptr [ebp+FFFFFC9C], eax
  176.  
  177. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  178. |:004555CE(C)
  179. |
  180. :0045545A C78588FBFFFF00000000    mov dword ptr [ebp+FFFFFB88], 00000000
  181. :00455464 E906000000              jmp 0045546F
  182.  
  183. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  184. |:00455587(U)
  185. |
  186. :00455469 FF8588FBFFFF            inc dword ptr [ebp+FFFFFB88]
  187.  
  188. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  189. |:00455464(U)
  190. |
  191. :0045546F 83BD88FBFFFF20          cmp dword ptr [ebp+FFFFFB88], 00000020
  192. :00455476 0F8D10010000            jnl 0045558C
  193. :0045547C B801000000              mov eax, 00000001
  194. :00455481 8A8D88FBFFFF            mov cl, byte ptr [ebp+FFFFFB88]
  195. :00455487 D3E0                    shl eax, cl
  196. :00455489 85859CFCFFFF            test dword ptr [ebp+FFFFFC9C], eax
  197. :0045548F 0F84F2000000            je 00455587
  198. :00455495 8B8588FBFFFF            mov eax, dword ptr [ebp+FFFFFB88]
  199. :0045549B 83C061                  add eax, 00000061
  200. :0045549E 50                      push eax
  201.  
  202. * Possible StringData Ref from Data Obj ->"%c:\"                    <-- Another common REF in CD checks
  203.                                   |
  204. :0045549F 68F0116A00              push 006A11F0
  205. :004554A4 8D85F8FDFFFF            lea eax, dword ptr [ebp+FFFFFDF8]
  206. :004554AA 50                      push eax
  207.  
  208. * Reference To: USER32.wsprintfA, Ord:0248h
  209.                                   |
  210. :004554AB FF1504B47700            Call dword ptr [0077B404]
  211. :004554B1 83C40C                  add esp, 0000000C
  212. :004554B4 8D85F8FDFFFF            lea eax, dword ptr [ebp+FFFFFDF8]
  213. :004554BA 50                      push eax
  214.  
  215. * Reference To: KERNEL32.GetDriveTypeA, Ord:00D0h                   <-- Commonly used call in CD checks
  216.                                   |
  217. :004554BB FF1504B37700            Call dword ptr [0077B304]
  218. :004554C1 83F805                  cmp eax, 00000005                 <-- 05 is the code for CD-ROM drive
  219. :004554C4 0F85BD000000            jne 00455587
  220. :004554CA C685FCFEFFFF00          mov byte ptr [ebp+FFFFFEFC], 00
  221. :004554D1 6A00                    push 00000000
  222. :004554D3 6A00                    push 00000000
  223. :004554D5 8D85E4FDFFFF            lea eax, dword ptr [ebp+FFFFFDE4]
  224. :004554DB 50                      push eax
  225. :004554DC 8D85E8FDFFFF            lea eax, dword ptr [ebp+FFFFFDE8]
  226. :004554E2 50                      push eax
  227. :004554E3 6A00                    push 00000000
  228. :004554E5 6804010000              push 00000104
  229. :004554EA 8D85FCFEFFFF            lea eax, dword ptr [ebp+FFFFFEFC]
  230. :004554F0 50                      push eax
  231. :004554F1 8D85F8FDFFFF            lea eax, dword ptr [ebp+FFFFFDF8]
  232. :004554F7 50                      push eax
  233.  
  234. * Reference To: KERNEL32.GetVolumeInformationA, Ord:0135h           <-- Get the volume name
  235.                                   |
  236. :004554F8 FF1514B37700            Call dword ptr [0077B314]
  237. :004554FE 8D85FCFEFFFF            lea eax, dword ptr [ebp+FFFFFEFC]
  238. :00455504 50                      push eax
  239. :00455505 E8A47B0000              call 0045D0AE
  240. :0045550A 83C404                  add esp, 00000004
  241.  
  242. * Possible StringData Ref from Data Obj ->"MK3PCCDROM"              <-- Volume name of CD
  243.                                   |
  244. :0045550D 68F8116A00              push 006A11F8
  245. :00455512 8D85FCFEFFFF            lea eax, dword ptr [ebp+FFFFFEFC]
  246. :00455518 50                      push eax
  247. :00455519 E89A2E0000              call 004583B8
  248. :0045551E 83C408                  add esp, 00000008
  249. :00455521 85C0                    test eax, eax
  250. :00455523 0F855E000000            jne 00455587
  251. :00455529 C785A0FCFFFF01000000    mov dword ptr [ebp+FFFFFCA0], 00000001
  252. :00455533 8B8588FBFFFF            mov eax, dword ptr [ebp+FFFFFB88]
  253. :00455539 83C061                  add eax, 00000061
  254. :0045553C 50                      push eax
  255.  
  256. * Possible StringData Ref from Data Obj ->"%c:\attract\controlp.bin"  <-- Check for this file (CD path)
  257.                                   |
  258. :0045553D 6804126A00              push 006A1204
  259. :00455542 8D8598FBFFFF            lea eax, dword ptr [ebp+FFFFFB98]
  260. :00455548 50                      push eax
  261.  
  262. * Reference To: USER32.wsprintfA, Ord:0248h
  263.                                   |
  264. :00455549 FF1504B47700            Call dword ptr [0077B404]
  265. :0045554F 83C40C                  add esp, 0000000C
  266. :00455552 8D85A4FCFFFF            lea eax, dword ptr [ebp+FFFFFCA4]
  267. :00455558 50                      push eax
  268. :00455559 8D8598FBFFFF            lea eax, dword ptr [ebp+FFFFFB98]
  269. :0045555F 50                      push eax
  270.  
  271. * Reference To: KERNEL32.FindFirstFileA, Ord:007Bh
  272.                                   |
  273. :00455560 FF1500B37700            Call dword ptr [0077B300]
  274. :00455566 85C0                    test eax, eax
  275. :00455568 0F8414000000            je 00455582
  276. :0045556E 8D85F8FDFFFF            lea eax, dword ptr [ebp+FFFFFDF8]
  277. :00455574 50                      push eax
  278. :00455575 68F8A84600              push 0046A8F8
  279. :0045557A E8A92D0000              call 00458328
  280. :0045557F 83C408                  add esp, 00000008
  281.  
  282. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  283. |:00455568(C)
  284. |
  285. :00455582 E905000000              jmp 0045558C
  286.  
  287. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  288. |:0045548F(C), :004554C4(C), :00455523(C)
  289. |
  290. :00455587 E9DDFEFFFF              jmp 00455469
  291.  
  292. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  293. |:00455476(C), :00455582(U)
  294. |
  295. :0045558C 83BDA0FCFFFF00          cmp dword ptr [ebp+FFFFFCA0], 00000000
  296. :00455593 0F852E000000            jne 004555C7
  297. :00455599 6A05                    push 00000005
  298.  
  299. * Possible StringData Ref from Data Obj ->"MKIII Win95"
  300.                                   |
  301. :0045559B 6820126A00              push 006A1220
  302.  
  303. * Possible StringData Ref from Data Obj ->"Please insert the Mortal Kombat "  <-- String that got us here in
  304.                                         ->"III CD"                            <-- the first place
  305.                                   |
  306. :004555A0 682C126A00              push 006A122C
  307. :004555A5 6A00                    push 00000000
  308.  
  309. * Reference To: USER32.MessageBoxA, Ord:0186h
  310.                                   |
  311. :004555A7 FF1524B47700            Call dword ptr [0077B424]
  312. :004555AD 8985F4FDFFFF            mov dword ptr [ebp+FFFFFDF4], eax
  313. :004555B3 83BDF4FDFFFF02          cmp dword ptr [ebp+FFFFFDF4], 00000002  <-- 02 means you hit cancel
  314. :004555BA 0F8507000000            jne 004555C7
  315. :004555C0 33C0                    xor eax, eax                            <-- Zero in eax means failed CD check
  316. :004555C2 E917000000              jmp 004555DE
  317.  
  318. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  319. |:00455593(C), :004555BA(C)
  320. |
  321. :004555C7 83BDA0FCFFFF00          cmp dword ptr [ebp+FFFFFCA0], 00000000
  322. :004555CE 0F8486FEFFFF            je 0045545A
  323. :004555D4 B801000000              mov eax, 00000001                      <-- 01 in eax means CD check passed
  324. :004555D9 E900000000              jmp 004555DE
  325.  
  326. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  327. |:004555C2(U), :004555D9(U)
  328. |
  329. :004555DE 5F                      pop edi
  330. :004555DF 5E                      pop esi
  331. :004555E0 5B                      pop ebx
  332. :004555E1 C9                      leave
  333. :004555E2 C3                      ret                                    <-- Return to the caller
  334.  
  335.     That's plenty of information, in fact we now know everything we need to know to crack this one.
  336. First, the call to the check is made from 455778 and we know a zero in eax means the CD check failed.
  337. Now we need to look at the section of code that calls the above CD check.
  338.  
  339.   -- Program Code --
  340.  
  341. :00455771 33C0                    xor eax, eax
  342. :00455773 E9B8080000              jmp 00456030
  343.  
  344. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  345. |:0045574A(C), :00455757(C)
  346. |
  347. :00455778 E84DFBFFFF              call 004552CA          <-- Call the CD check routine
  348. :0045577D 85C0                    test eax, eax          <-- Check the result in eax
  349. :0045577F 0F8507000000            jne 0045578C           <-- Take this call to continue
  350. :00455785 33C0                    xor eax, eax           <-- CD check failed so set up to quit
  351. :00455787 E9A4080000              jmp 00456030           <--   to Win95 through this jump
  352.  
  353. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  354. |:0045577F(C)
  355. |
  356. :0045578C 8B4508                  mov eax, dword ptr [ebp+08]   <-- Jump here to continue with the game
  357. :0045578F A3F0A64600              mov dword ptr [0046A6F0], eax
  358. :00455794 C70508A7460000000000    mov dword ptr [0046A708], 00000000
  359. :0045579E C705F4A6460000000000    mov dword ptr [0046A6F4], 00000000
  360.  
  361.   -- Continuing Program Code --
  362.  
  363.     Well there you go, all you have to do is make sure the CD check call is never made and force the
  364. conditional jump at 45577F is always taken.  To do this just change the call 004552CA (E8 4D FB FF FF) to
  365. mov eax, 00000001 (B8 01 00 00 00).  This way eax is loaded with 01, tested against itself which will force
  366. the jne (Jump Not Equal) to always be true (taken).  This of course means you can play the game from the
  367. hard drive without having the original MK3 CD in the CD-ROM drive.  To crack Mortal Kombat 3 do the following:
  368.  
  369. 1.  Install MK3
  370. 2.  Copy all subdirectories from the CD EXCEPT "Directx" to the same
  371.     subdirectory you installed MK3 to.  ~60 megs worth of files
  372.  
  373. 3.  Edit mk3w.exe at offset 347,000
  374. ====================================
  375. Search for: E8 4D FB FF FF
  376. Change to : B8 01 00 00 00
  377.  
  378.     Running mk3w.exe results in a game that can be played completely from your hard drive and you'll
  379. never have to put the MK3 CD in your CD-ROM drive.  That's how you get Mortal Kombat 3 FiX'ed
  380.  
  381. Static Vengeance
  382.